1
2
3
4
5
6 package spoon.reflect.declaration;
7
8 import spoon.reflect.reference.CtTypeReference;
9 import spoon.reflect.annotations.PropertyGetter;
10 import spoon.reflect.annotations.PropertySetter;
11 import spoon.support.UnsettableProperty;
12
13 import java.util.List;
14
15 import static spoon.reflect.path.CtRole.VALUE;
16
17
18
19
20
21
22
23
24
25
26 public interface CtEnum<T extends Enum<?>> extends CtClass<T> {
27
28
29
30
31
32
33
34 @PropertySetter(role = VALUE)
35 <C extends CtEnum<T>> C addEnumValue(CtEnumValue<?> enumValue);
36
37
38
39
40
41
42
43
44 @PropertySetter(role = VALUE)
45 boolean removeEnumValue(CtEnumValue<?> enumValue);
46
47
48
49
50
51
52
53
54 @PropertyGetter(role = VALUE)
55 CtEnumValue<?> getEnumValue(String name);
56
57
58
59
60
61
62 @PropertyGetter(role = VALUE)
63 List<CtEnumValue<?>> getEnumValues();
64
65
66
67
68 @PropertySetter(role = VALUE)
69 <C extends CtEnum<T>> C setEnumValues(List<CtEnumValue<?>> enumValues);
70
71 @Override
72 CtEnum<T> clone();
73
74 @Override
75 @UnsettableProperty
76 <T extends CtFormalTypeDeclarer> T setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters);
77
78 @Override
79 @UnsettableProperty
80 <C extends CtType<T>> C setSuperclass(CtTypeReference<?> superClass);
81 }